package com.example.demo.redis.mapper;

import com.example.demo.model.Material;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by Administrator on 2018/12/28.
 */
@Mapper
public interface RedisZhuJieMapper {

    @Select("select * from material")
    List<Material> queryZhuJieMaterial();

    @Update("update material set materialCode=#{materialCode},materialName=#{materialName} where id=#{id}")
    int updateZhuJieMaterial(Material material);

    @Delete("delete from material where id=#{id}")
    void deleteZhuJieMaterial(@Param("id") Integer id);

    @Insert("INSERT INTO Material (id,materialCode,materialName,status,materialDesc) VALUES " +
            "(#{id},#{materialCode},#{materialName},#{status},#{materialDesc})")
    int insertZhuJieMaterial(Material material);
}
